﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using OgilvyOne.BLL;
using OgilvyOne.Model;

/// <summary>
/// 前台页面基类,可获取公共导航,当前会员状态/信息等

/// </summary>
public class FrontBasePage : BasePage
{
    //前台用户SESSION 常量
    protected const string FRONT_USER_INFO = "FRONT_USER_INFO";
    public FrontBasePage()
    {
        
    }
    /// <summary>
    /// 当前登录会员信息
    /// </summary>
    /// <returns></returns>
    protected MemberInfoModel GetSessionMemberInfo()
    {
        return (MemberInfoModel)Session[FRONT_USER_INFO];
    }
    protected void SetSessionMemberInfo(MemberInfoModel model)
    {
        Session[FRONT_USER_INFO] = model;
    }
    /// <summary>
    /// 会员是否登录
    /// </summary>
    /// <returns></returns>
    protected bool isLogin()
    {
        if (GetSessionMemberInfo() == null)
            return false;
        return true;
    }
}
